//用户信息正则校验
function isNickname(name)
{
	var patrn=/^[\u4e00-\u9fa5a-zA-Z0-9_]{3,16}$/;
	if (!patrn.exec(name)) 
		return false;
	return true;
}
function isCellphone(cellphone)
{
	var patrn=/^[0-9]{11}$/; 
	if (!patrn.exec(cellphone)) 
		return false;
	return true;
}
function isEmail(email)
{
	var patrn=/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;
	if (!patrn.exec(email)) 
		return false;
	return true;
}
function isPassword(password)
{
	var patrn=/^.{6,16}$/;
	if (!patrn.exec(password)) 
		return false ;
	return true ;
}
function isSpecialChars(string)
{
	var patrn=/[\\@#\$%\^&\*]/;
	if (patrn.exec(string)) 
		return false ;
	return true ;
}
function isCaptcha(captcha)
{
	var patrn=/^[a-zA-Z0-9]{5}$/;
	if (!patrn.exec(captcha)) 
		return false ;
	return true ;
}
function HTMLEncode(str)   
{   
	s = "";   
	if (str.length == 0) return "";   
	s = str.replace(/&/g, "&gt;");   
	s = s.replace(/</g, "&lt;");   
	s = s.replace(/>/g, "&gt;");   
	s = s.replace(/ /g, "&nbsp;");   
	s = s.replace(/\'/g, "&#39;");   
	s = s.replace(/\"/g, "&quot;");   
	s = s.replace(/\n/g, "<br>");   
	return s;   
}   
function HTMLDecode(str)   
{   
	s = "";   
	if (str.length == 0) return "";   
	s = str.replace(/&gt;/g, "&");   
	s = s.replace(/&lt;/g, "<");   
	s = s.replace(/&gt;/g, ">");   
	s = s.replace(/&nbsp;/g, " ");   
	s = s.replace(/&#39;/g, "\'");   
	s = s.replace(/&quot;/g, "\"");   
	s = s.replace(/<br>/g, "\n");   
	return s;   
}   